<?php

declare (strict_types=1);
namespace App\Model;

use Carbon\Carbon;

/**
 * @property int $id 
 * @property int $user_id 接收用户ID
 * @property string $type 通知类型
 * @property string $title 通知标题
 * @property string $content 通知内容
 * @property array $data 附加数据
 * @property boolean $read 是否已读
 * @property Carbon $read_at 阅读时间
 * @property Carbon $created_at
 * @property Carbon $updated_at
 */
class Notification extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'notifications';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['id', 'user_id', 'type', 'title', 'content', 'data', 'read', 'read_at', 'created_at', 'updated_at'];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'user_id' => 'integer', 'read' => 'boolean', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'data' => 'array', 'read_at' => 'datetime'];
}